<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <div style="display: flex;justify-content: space-between;">
        <button>-</button>
        <button type="button">+</button>

    </div>
    <div style="background: #eee;padding: 40px;box-sizing: border-box;">
        <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit.
             Repellendus repudiandae pariatur veritatis id, vero
              accusantium et officiis, laborum soluta eligendi
               tempore cum sunt aperiam? Cum iure delectus reic
               iendis odit maxime.
        </p>
        <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit.
            Repellendus repudiandae pariatur veritatis id, vero
             accusantium et officiis, laborum soluta eligendi
              tempore cum sunt aperiam? Cum iure delectus reic
              iendis odit maxime.
       </p>
       <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit.
        Repellendus repudiandae pariatur veritatis id, vero
         accusantium et officiis, laborum soluta eligendi
          tempore cum sunt aperiam? Cum iure delectus reic
          iendis odit maxime.
         </p>
         <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit.
            Repellendus repudiandae pariatur veritatis id, vero
             accusantium et officiis, laborum soluta eligendi
              tempore cum sunt aperiam? Cum iure delectus reic
              iendis odit maxime.
       </p>


       <script>
           var btns = document.querySelectorAll('button');
           var num = 20

           btns[0].onclick=function(){
               num = num - 5
                if(num<15){
                    num = 15
                    document.body.style.fontSize=num + 'px'
                }else{
                    document.body.style.fontSize=num + 'px'
                }
           }
           btns[1].onclick=function(){
               num = num + 5
                if(num>40){
                    num = 40
                    document.body.style.fontSize=num + 'px'
                }else{
                    document.body.style.fontSize=num + 'px'
                }
           }
       </script>
    </div>
</body>
</html>